home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7241 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: mudskipper.cac.psu.edu!user
  2. From: fcusack@tdx.org (frank.)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Leap Years
  5. Date: Fri, 16 Feb 1996 12:56:07 -0400
  6. Organization: Psychic Enemies Network
  7. Distribution: world
  8. Message-ID: <fcusack-1602961256070001@mudskipper.cac.psu.edu>
  9. References: <8BA8405.02C70020E1.uuout@sourcebbs.com> <4fsk14$jo2@kocrsv08.delcoelect.com> <3121EF9A.CA5@mail.isd.net> <4g28ut$p87@taurus.fccc.edu>
  10. NNTP-Posting-Host: mudskipper.cac.psu.edu
  11.  
  12. In article <4g28ut$p87@taurus.fccc.edu>, C_Herceg@fccc.edu wrote:
  13.  
  14. > In article <3121EF9A.CA5@mail.isd.net>, "David A. Peterson"
  15. > <dpeterso@mail.isd.net> writes:
  16. > >Richard E. Fiegle wrote:
  17. > >> 
  18. > >> david.mohorn@sourcebbs.com (DAVID MOHORN) wrote:
  19. > >> >How do you feature out leap years?  If its evenly divisible by 400
  20. > >and
  21. > >> >4?
  22. > >> >
  23. > >> 
  24. > >> Anything divisible by 4 is already guaranteed to be
  25. > >> divisible by 400.
  26. > >
  27. > >
  28. > >Leap years are evenly divisible by 4, except those that are evenly
  29. > >divisible by 100.
  30. > >Leap centuries are evenly divisible by 400. 2000 will be a leap
  31. > >century!
  32. > Why, then, is 2000 a leap year, since it is evenly divisible by 100?
  33. > Wasn't 1900 a leap year? If 1904 was (1904/4=476) by your definition a
  34. > leap year, then 1900 must have been. Why are years that are evenly
  35. > divisible by 100 excluded?
  36.  
  37. His definition is (slightly) wrong. A year is a leap year if it is
  38. divisible by 4, unless it is the end of the century (1800, 1900, 2000,
  39. ...). In that case, it must be divisible by 400 in order to be a leap
  40. year. No, 1900 was not a leap year. Three out of four centuries are
  41. excluded so that the calendar remains in sync with our orbit around the
  42. sun (so seasons are "predictable"). It's not perfect however. Every so
  43. often, we have to add a leap second, which occurs on 1/1 at midnight. Does
  44. anyone know what the rule is for leap seconds?
  45. ~Frank
  46.  -- I am Pentium of Borg.  Division is futile.  You will be approximated. --
  47.  --   If you build it, they will come --> http://www.tdx.org/~fcusack/    --
  48.  -- PGP key fingerprint: 01 C0 C0 B9 CC 78 67 0F  3F 64 80 65 8B 0F F9 EA --
  49.